package com.shangyueshang.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2022/2/18 11:16
 * @version: v1.0.0
 * <p>
 * 渠道类型
 */
@Getter
@AllArgsConstructor
public enum Channel {

    EXPRESS("EXP", "快递"),
    DHL("DHL", "DHL快递"),
    YIXING("YiXing", "以星"),
    EXX("exx", "待确认"),
    YIXING_KP("YiXing_kp", "以星卡派"),
    YIXING_HK("YiXing_hk", "以星海卡"),
    YIXING_HP("YiXing_hp", "以星海派"),
    LIMITED_KP("Limited_kp", "卡派限时达"),
    KA_HANG("KaHang", "卡航"),
    KA_CAR("KaCar", "卡车"),
    GE_SHIP("German_ship", "德国船运"),
    FAST_SHIP_KP("Fast_ship_kp", "快船卡派"),
    FAST_SHIP_TP("Fast_ship_tp", "快船统配"),
    COMMON_SHIP("Common_ship", "普船"),
    COMMON_SHIP_COSCO_HP("Common_ship_cosco_hp", "普船COSCO海派"),
    EXTREME_FAST("Extreme_fast", "极速达"),
    REGULAR_SHIP("Regular_ship", "正班船"),
    TARZAN_WEST("Tarzan_west", "泰山西"),
    TAX_PACKAGE_HK("Tax_package_hk", "海卡包税"),
    LIMITED_HK("Limited_hk", "海卡限时达"),
    SHIPPING("Shipping", "海运"),
    AIR("Air", "空派"),
    TONGPEI("Tongpei", "统配"),
    MASON("Mason", "美森"),
    MASON_KP("Mason_kp", "美森卡派"),
    MASON_hP("Mason_hp", "美森海派"),
    MASON_hk("Mason_hk", "美森海卡"),
    LIMITED_MASON("Limited_mason", "美森限时达"),
    MASON_RELAY("Mason_relay", "美森限时达"),
    LIANYU("Lianyu", "联宇"),
    RAILWAY("Railway", "铁路"),
    LIMITED("Limited", "限时达"),
    ;

    public final String code;
    public final String value;

    public static Channel of(String code) {
        Channel[] values = values();
        for (Channel fs : values) {
            if (code.equals(fs.code)) {
                return fs;
            }
        }
        return null;
    }
}
